﻿
using Mes.Domain.BoundedContext;

namespace Mes.Application.DTO.Inputs.Quality
{
    public class SamplePlanCommon
    {
        /// <summary>
        /// 采样计划名称
        /// </summary>
        public string Plan_Name { get; set; } = string.Empty;

        /// <summary>
        /// 采样计划描述
        /// </summary>
        public string? Plan_Desc { get; set; }

        /// <summary>
        /// 采样计划频率id
        /// </summary>
        public int Freq_Id { get; set; } = -1;

        /// <summary>
        /// 采样名称
        /// </summary>
        public string Sample_Name { get; set; } = string.Empty;

        /// <summary>
        /// 自定义字段1
        /// </summary>
        public string? Spare1 { get; set; }

        /// <summary>
        /// 自定义字段2
        /// </summary>
        public string? Spare2 { get; set; }

        /// <summary>
        /// 自定义字段3
        /// </summary>
        public string? Spare3 { get; set; }

        /// <summary>
        /// 自定义字段4
        /// </summary>
        public string? Spare4 { get; set; }
    }

    public class SamplePlanAddingInput : SamplePlanCommon { }

    public class SamplePlanUpdatingInput : SamplePlanCommon
    {
        /// <summary>
        /// 采样计划id
        /// </summary>
        public int Plan_Id { get; set; } = -1;
    }

    public class GettingSamplePlanPagedInput
    {
        /// <summary>
        /// 查询关键字(采样计划名称或采样命名惯例)
        /// </summary>
        public string? KeyWord { get; set; }

        /// <summary>
        /// 分页参数
        /// </summary>
        public PagedInput PagedInput { get; set; } = new PagedInput();
    }

    public class SamplePlanFreqAddingInput
    {
        public SamplePlanFreqAddingInput() { }

        public SamplePlanFreqAddingInput(int planId, int freqId)
        {
            Plan_Id = planId;
            Freq_Id = freqId;
        }

        /// <summary>
        /// 采样计划id
        /// </summary>
        public int Plan_Id { get; set; } = 0;

        /// <summary>
        /// 采样计划频率id
        /// </summary>
        public int Freq_Id { get; set; } = 0;
    }
}
